home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Auge 4000
/
Auge 4000 #44 (1990-05-04)(Amiga User Gruppe Einzugsgebiet 4000).zip
/
Auge 4000 #44 (1990-05-04)(Amiga User Gruppe Einzugsgebiet 4000).adf
/
Unterhaltung
/
Zocker
/
Berliner Macke
(
.txt
)
< prev
next >
Wrap
AmigaBASIC Source Code
|
1990-05-01
|
10KB
|
414 lines
REM ********************
REM * *
REM * Berliner Macke *
REM * *
REM * AmigaBASIC *
REM * *
REM ********************
CLEAR ,30000
OPTION BASE 1
DIM Vorname$(8),p(8),w(6),w1(6),v(10),v1(6),n(6)
RANDOMIZE TIMER
SCREEN 2,320,250,5,1
WINDOW 2,"",,16,2
OPEN"Wuerfel1" FOR INPUT AS 1
Eins$=INPUT$(LOF(1),1):OBJECT.SHAPE 1,Eins$:CLOSE 1
OPEN"Wuerfel2" FOR INPUT AS 1
Zwei$=INPUT$(LOF(1),1):OBJECT.SHAPE 2,Zwei$:CLOSE 1
OPEN"Wuerfel3" FOR INPUT AS 1
Drei$=INPUT$(LOF(1),1):OBJECT.SHAPE 3,Drei$:CLOSE 1
OPEN"Wuerfel4" FOR INPUT AS 1
Vier$=INPUT$(LOF(1),1):OBJECT.SHAPE 4,Vier$:CLOSE 1
OPEN"Wuerfel5" FOR INPUT AS 1
Fuenf$=INPUT$(LOF(1),1):OBJECT.SHAPE 5,Fuenf$:CLOSE 1
OPEN"Wuerfel6" FOR INPUT AS 1
Sechs$=INPUT$(LOF(1),1):OBJECT.SHAPE 6,Sechs$:CLOSE 1
OPEN"Pfeil" FOR INPUT AS 1
Pfeil$=INPUT$(LOF(1),1):OBJECT.SHAPE 7,Pfeil$:CLOSE 1
Anfang:
COLOR 0,6:CLS
GOSUB Macke
COLOR 2,6:LOCATE 5,2:PRINT"SPIELERANZAHL (2-8):":a=2
LOCATE 5,23:PRINT USING"#";a
Abfrage:
ta$=INKEY$:IF ta$=CHR$(13) THEN Weiter
IF ta$=CHR$(32) THEN CALL Pause:a=a+1
IF a>8 THEN a=2
IF ta$=CHR$(32) THEN SOUND 110*a,2,255:LOCATE 5,23:PRINT USING"#";a
GOTO Abfrage
Weiter:
LOCATE 8,2:PRINT"DER COMPUTER WILL SIE GERNE BESIEGEN."
LOCATE 10,2:PRINT"SEIN NAME: <Comp>"
LOCATE 13,12:PRINT"DIE SPIELERNAMEN:"
m2=1:j=1:FOR i=1 TO a
LOCATE 13+i*2,2:PRINT"SPIELER"+STR$(i):LOCATE 13+i*2,11:INPUT Vorname$(i)
IF Vorname$(i)<>"Comp" THEN Weiter1
Vorname$(i)="Computer"+STR$(j):j=j+1
Weiter1:
NEXT i:CLS
COLOR 0,6:FOR i=16 TO 25:COLOR 0,5:LOCATE i,4:PRINT SPACE$(14):COLOR 0,4:LOCATE i,23:PRINT SPACE$(14):NEXT i
COLOR 1,4:LOCATE 29,4:PRINT" PD-SOFTWARE VON A.U.G.E. 4000 "
Schleife:
FOR j=1 TO a:CALL Null(w()):OBJECT.CLOSE
g=0:u2=0
COLOR 0,6:LOCATE 2,1:PRINT SPACE$(39):GOSUB Macke
COLOR 1,2:FOR wid=1 TO a+2:LOCATE 3+wid,1:PRINT SPACE$(39):NEXT wid
LOCATE 4,8:PRINT"SPIELER:":LOCATE 4,26:PRINT"PUNKTE:"
FOR i=1 TO a
LOCATE 5+i,8:PRINT LEFT$(Vorname$(i),12)
LOCATE 5+i,27:PRINT USING"#####";p(i)
NEXT i
LOCATE 5+j,7:PRINT">":LOCATE 5+j,20:PRINT"<"
LOCATE 5+j,26:PRINT">":LOCATE 5+j,32:PRINT"<"
LOCATE 5+m2,24:PRINT"=>":LOCATE 5+m2,33:PRINT"<="
IF MID$(Vorname$(j),1,4)="Comp" THEN CompZug
Spielerzug:
SOUND 880,2,255
Taste:
ta$=INKEY$:FOR j2=1 TO 25:NEXT j2
Zurueck1:
COLOR 1,2:LOCATE 27,4:PRINT Vorname$(j)+" (W)ÜRFELN!"
COLOR 1,6:LOCATE 27,37:PRINT" "
FOR j2=1 TO 50:NEXT j2
COLOR 0,2:LOCATE 27,4:PRINT SPACE$(33)
IF ta$<>"w" THEN Taste
GOSUB Wuerfeln
IF z=0 THEN GOSUB Feststellung3:GOTO Fortsetzung
IF z>6 THEN GOSUB Jump:GOSUB Anzeige2:GOTO Entscheidung
Zurueck2:
COLOR 1,2:LOCATE 27,4:PRINT"PFEILE + >RETURN<, (E)NDE"
COLOR 1,6:LOCATE 27,37:PRINT" "
FOR i=1 TO 6:IF w(i)=10 THEN Naechste4
IF v(w(i))>0 THEN Pfeil
Naechste4:
NEXT i
Pfeil:
OBJECT.SHAPE 7,Pfeil$
GOSUB Koordinaten
OBJECT.X 7,c(i):OBJECT.Y 7,b(i):OBJECT.ON 7
GOSUB Bewegen:GOSUB Anzeige2
IF z>0 OR ta$="e" THEN ETaste
Entscheidung:
ta$=INKEY$:FOR j2=1 TO 20:NEXT j2
COLOR 1,2:LOCATE 27,4:PRINT"(W)ÜRFELN (E)NDE"+SPACE$(10)
COLOR 1,6:LOCATE 27,37:PRINT" "
IF ta$="w" THEN WTaste
IF ta$="e" THEN ETaste2
COLOR 1,2:LOCATE 27,4:PRINT SPACE$(33)
GOTO Entscheidung
ETaste:
IF ta$="e" THEN Anzeige3
Entscheidung2:
ta$=INKEY$:FOR j2=1 TO 20:NEXT j2
COLOR 1,2:LOCATE 27,4:PRINT"(S)ETZEN (W)ÜRFELN (E)NDE"
COLOR 1,6:LOCATE 27,37:PRINT" "
IF ta$="s" THEN Zurueck2
WTaste:
IF ta$="w" THEN GOSUB Loeschen:GOTO Zurueck1
ETaste2:
IF ta$="e" THEN GOSUB Gueltig:GOTO Anzeige3
COLOR 1,2:LOCATE 27,4:PRINT SPACE$(33)
GOTO Entscheidung2
Anzeige3:
u2=u2+u1
p(j)=p(j)+u2:COLOR 1,2:LOCATE 5+j,27:PRINT USING"#####";p(j)
m=0:FOR i=1 TO a:IF p(i)>m THEN m1=m:m=p(i):m2=i
NEXT i
m1=0:FOR i=1 TO a:IF i=m2 OR p(i)<m1 THEN Naechste9
IF i<>m2 OR p(i)>=m1 THEN m1=p(i)
Naechste9:
NEXT i
OBJECT.CLOSE
FOR i=1 TO 4
SOUND 880,1,255:COLOR 1,2:LOCATE 5+m2,24:PRINT" ":LOCATE 5+m2,33:PRINT"<="
FOR verz=1 TO 3:CALL Pause:NEXT verz
SOUND 880,1,255:LOCATE 5+m2,24:PRINT"=>":LOCATE 5+m2,33:PRINT" "
FOR verz=1 TO 3:CALL Pause:NEXT verz
NEXT i
LOCATE 5+m2,33:PRINT"<="
SOUND 830,5,255:SOUND 1108,5,255
Fortsetzung:
NEXT j
IF m<10000 THEN Schleife
FOR aa=1 TO 3000:NEXT aa
OBJECT.CLOSE
COLOR 0,6:CLS:GOSUB Macke
COLOR 2,6:LOCATE 4,15:PRINT"SPIELENDE"
FOR i=1 TO 7:FOR j=i+1 TO a
IF p(i)>=p(j) THEN Naechste11
m=p(i):a$=Vorname$(i):p(i)=p(j)
Vorname$(i)=Vorname$(j):p(j)=m:Vorname$(j)=a$
Naechste11:
NEXT j:NEXT i
LOCATE 7,11:PRINT"DIE SIEGERLISTE:"
FOR i=1 TO a
LOCATE 8+2*i,7:PRINT STR$(i)+". "+LEFT$(Vorname$(i),12):LOCATE 8+2*i,24:PRINT USING"#####";p(i)
NEXT i
LOCATE 28,10:PRINT"NEUES SPIEL (J/N) ?"
Tasten:
ta$=INKEY$
IF ta$="j" THEN GOSUB Nullen:GOTO Anfang
IF ta$="n" THEN COLOR 1,2:CLS:LOCATE 15,10:PRINT"BIS ZUM NÄCHSTEN MAL!":END
GOTO Tasten
CompZug:
u2=0
Display1:
SOUND 990,3,255:COLOR 1,2
LOCATE 27,4:PRINT Vorname$(j)+" WÜRFELT"+SPACE$(15)
COLOR 1,6:LOCATE 27,37:PRINT" "
CALL Null(n()):GOSUB Wuerfeln
IF z=0 THEN GOSUB Feststellung3:GOTO Fortsetzung
IF z>5 THEN GOSUB Jump:u3=u+u2:GOSUB Stoppen:ON f GOTO Display,Loeschen3
GOSUB Setzt
Zurueck3:
k=-10:FOR i=1 TO 6
IF v(i)=0 THEN Naechste10
IF INT(n(i)/v(i)+0.5)<=k THEN Naechste10
k=n(i):l=i
Naechste10:
NEXT i
FOR i=1 TO 6:IF w(i)=l THEN Gleiten1
NEXT i
Gleiten1:
GOSUB Gleiten
CALL Null(n()):IF z=0 THEN Addition
r=10:GOSUB ZufEntscheidung
IF f=1 THEN Addition
CALL Null(v()):CALL Wert(v(),w(),u,z,n()):GOTO Zurueck3
Addition:
u3=u2+u1:GOSUB Stoppen
ON f GOTO Gueltig1,Loeschen3
Loeschen3:
GOSUB Loeschen:GOTO Display1
Gueltig1:
GOSUB Gueltig
Display:
GOSUB Anzeige2
SOUND 990,3,255:COLOR 1,2:LOCATE 27,4:PRINT Vorname$(j)+" HÖRT AUF"+SPACE$(14)
COLOR 1,6:LOCATE 27,37:PRINT" "
GOTO Anzeige3
Nullen:
FOR i=1 TO 8:p(i)=0:NEXT i
RETURN
Macke:
COLOR 2,5
FOR i=1 TO 20:FOR j1=1 TO 30:NEXT j1
SOUND 270+10*i,1.5,255
LOCATE 2,41-2*i:PRINT" * * * * * * BERLINER MACKE * * * * * *"
NEXT i
RETURN
Wuerfeln:
CALL Null(w1())
FOR i=1 TO 6
IF w(i)=10 THEN Naechste
w(i)=INT(RND*6)+1
IF w(i)=1 THEN Sprite$(i)=Eins$
IF w(i)=2 THEN Sprite$(i)=Zwei$
IF w(i)=3 THEN Sprite$(i)=Drei$
IF w(i)=4 THEN Sprite$(i)=Vier$
IF w(i)=5 THEN Sprite$(i)=Fuenf$
IF w(i)=6 THEN Sprite$(i)=Sechs$
Naechste:
NEXT i
COLOR 1,2:LOCATE 15,4:PRINT"WURF:":LOCATE 15,23:PRINT"SUMME:"
LOCATE 15,29:PRINT USING"#####";u2
FOR i=1 TO 6
IF w(i)=10 THEN Naechste1
SOUND 180*i,2,255
OBJECT.SHAPE i,Sprite$(i)
GOSUB Koordinaten
OBJECT.X i,c(i)
OBJECT.Y i,b(i)
OBJECT.ON i
Naechste1:
NEXT i
IF g>0 THEN Werte
IF g<1 THEN GOSUB Feststellung1
IF z=10 THEN Anzeige
Werte:
CALL Null(v())
CALL Wert(v(),w(),u,z,n())
IF z+g=6 THEN z=20:GOSUB Feststellung2
Anzeige:
COLOR 1,2:LOCATE 15,9:PRINT USING"#####";u
RETURN
Anzeige2:
COLOR 1,2:LOCATE 15,29:PRINT USING"#####";u2+u1
RETURN
Setzt:
SOUND 990,3,255:COLOR 1,2:LOCATE 27,4:PRINT Vorname$(j)+" SETZT"+SPACE$(17)
COLOR 1,6:LOCATE 27,37:PRINT" "
RETURN
ZufEntscheidung:
IF INT(RND*100)+1<=r THEN f=2
IF INT(RND*100)+1>r THEN f=1
RETURN
Stoppen:
k=p(j)+u3:IF k<m THEN Ermittlung
IF p(j)<m THEN m1=m
GOTO Ermittlung2
Ermittlung:
GOSUB Werte3
r=(7-g)*15+8-(10000-wt3)/1000-u3/100+(m-k)/1000
GOTO Ermittlung3
IF k>=10000 THEN r=0:RETURN
Ermittlung2:
r=(6-g)*15+(10000-k)/2000-u3/80+10-(k-m1)/1000
Ermittlung3:
GOSUB Werte4
GOSUB ZufEntscheidung
RETURN
Koordinaten:
b(i)=(16+INT((i-1)/3)*4)*8
c(i)=(-0.9+3.2*i-INT((i-1)/3)*8)*10
RETURN
Feststellung1:
FOR i=1 TO 5:FOR k=i+1 TO 6
IF w(i)=w(k) THEN RETURN
NEXT k:NEXT i
u=1000:u1=1000:z=10
COLOR 1,2:FOR i=1 TO 14:SOUND i*500,1.5,255
LOCATE 27,32-i*2:PRINT"STRASSE"+SPACE$(26)
NEXT i:COLOR 1,6:LOCATE 27,37:PRINT " ":FOR j3=1 TO 1500:NEXT j3
RETURN
Feststellung2:
COLOR 1,2:FOR i=1 TO 14:SOUND i*300,1.5,255
LOCATE 27,32-i*2:PRINT"ALLE WÜRFEL GELTEN!"+SPACE$(14)
NEXT i:COLOR 1,6:LOCATE 27,37:PRINT" ":u1=u:FOR j3=1 TO 1500:NEXT j3
RETURN
Feststellung3:
COLOR 0,6:LOCATE 2,1:PRINT SPACE$(39):GOSUB Macke
COLOR 1,2:FOR i=1 TO 14:SOUND i*400,1.5,255
LOCATE 27,32-i*2:PRINT"LEIDER GAR NICHTS!"+SPACE$(15)
NEXT i:COLOR 1,6:LOCATE 27,37:PRINT" ":FOR j3=1 TO 1500:NEXT j3
RETURN
Jump:
FOR i=1 TO 6
IF w(i)=10 THEN Naechste5
OBJECT.SHAPE 7,Pfeil$
GOSUB Koordinaten
OBJECT.X 7,c(i):OBJECT.Y 7,b(i):OBJECT.ON 7
SOUND 1100,2,255
OBJECT.X i,c(i)+152:OBJECT.Y i,b(i)
w1(i)=w(i)
Naechste5:
NEXT i
g=0:z=0:CALL Null(w()):OBJECT.CLOSE 7
GOSUB Anzeige2
RETURN
Loeschen:
u2=u2+u1
FOR i=1 TO 6:IF w(i)=10 THEN Naechste6
OBJECT.OFF i
Naechste6:
NEXT i
RETURN
Gueltig:
IF z=0 THEN RETURN
FOR i=1 TO 6
IF w(i)>6 THEN Naechste7
IF v(w(i))>0 THEN GOSUB Gleiten
Naechste7:
NEXT i
RETURN
Gleiten:
OBJECT.SHAPE 7,Pfeil$
GOSUB Koordinaten
OBJECT.X 7,c(i):OBJECT.Y 7,b(i):OBJECT.ON 7
CALL Move(i,b(i),c(i),w1(i),w(i),g,z,v())
IF w1(i)=1 AND v(1)<2 THEN Loeschen2
IF w1(i)=5 AND v(5)<2 THEN Loeschen2
FOR l=1 TO 6
IF w(l)<>w1(i) THEN Naechste8
OBJECT.X 7,c(l):OBJECT.Y 7,b(l):OBJECT.ON 7
CALL Move(l,b(l),c(l),w1(l),w(l),g,z,v())
Naechste8:
NEXT l
Loeschen2:
OBJECT.CLOSE 7:CALL Null(v1()):CALL Wert(v1(),w1(),u1,l,n())
GOSUB Anzeige2
RETURN
Bewegen:
SOUND 200,2,255
Key:
ta$=INKEY$
IF ta$=CHR$(30) THEN GOSUB Werte1:GOTO Hinsetzen
IF ta$=CHR$(31) THEN GOSUB Werte2:GOTO Hinsetzen
IF ta$="e" THEN GOSUB Gueltig:RETURN
IF ta$=CHR$(13) THEN Setzen
GOTO Key
Hinsetzen:
OBJECT.SHAPE 7,Pfeil$
GOSUB Koordinaten
OBJECT.X 7,c(i):OBJECT.Y 7,b(i):OBJECT.ON 7
GOTO Bewegen
Setzen:
OBJECT.SHAPE 7,Pfeil$
GOSUB Koordinaten
OBJECT.X 7,c(i):OBJECT.Y 7,b(i):OBJECT.ON 7
COLLISION ON
OBJECT.HIT 7,i,i
k=COLLISION(i)
IF k<>0 THEN Key
IF v(w(i))=0 OR w(i)=10 THEN Key
GOSUB Gleiten
RETURN
Werte1:
IF (i+1)<=6 THEN i=(i+1)
RETURN
Werte2:
IF (i-1)>=1 THEN i=(i-1)
RETURN
Werte3:
IF m>1000 THEN m=wt3
IF m<=1000 THEN wt3=1000
RETURN
Werte4:
IF r<95 THEN wt4=r
IF r>=95 THEN wt4=95
IF wt4>5 THEN r=wt4
IF wt4<=5 THEN r=5
RETURN
SUB Move(i,b,c,w1,w,g,z,v())STATIC
SOUND 330,3,255
FOR vx=c TO c+152
OBJECT.X i,vx:OBJECT.ON i
NEXT vx
SOUND 660,3,255
v(w)=v(w)-1:w1=w:w=10:g=g+1:z=z-1
END SUB
SUB Wert(v(),w(),u,z,n())STATIC
z=0:FOR i=1 TO 6
IF w(i)=10 OR w(i)=0 THEN Naechste2
v(w(i))=v(w(i))+1
Naechste2:
NEXT i:u=0
IF v(1)>2 THEN u=1000+(v(1)-3)*1000
IF v(1)<=2 THEN u=v(1)*100
n(1)=u:z=z+v(1)
FOR i=2 TO 6
IF i<>5 THEN Feststellung4
z=z+v(5)
IF v(5)>2 THEN Umrechnung1
IF v(5)<=2 THEN n(5)=v(5)*50:GOTO Umrechnung2
Feststellung4:
IF v(i)<3 THEN v(i)=0:GOTO Naechste3
IF v(i)<3 THEN n(i)=0:GOTO Naechste3
z=z+v(i)
Umrechnung1:
n(i)=i*100+(v(i)-3)*i*100
Umrechnung2:
u=u+n(i)
Naechste3:
NEXT i
END SUB
SUB Pause STATIC
FOR wid=1 TO 300:NEXT wid
END SUB
SUB Null(v())STATIC
FOR i=1 TO 6:v(i)=0:NEXT i
END SUB